<%--
  Created by IntelliJ IDEA.
  User: dell
  Date: 2021/1/13
  Time: 21:46
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>顾客退货录入</title>
    <script src="../element/vue.js"></script>
    <link rel="stylesheet" href="../element/index.css">
    <script src="../element/index.js"></script>
    <link rel="stylesheet" type="text/css" href="../styles/basc.css">
</head>
<body>
<div id="app">
    <%@ include file="../includes/hear.jsp" %>
    <div class="left">
        <%@ include file="../includes/menu.jsp" %>
    </div>
    <div class="right">
        <div class="operation" style="margin-left: 10px;padding-top: 10px;width: 200px;">验证添加信息↓：<span class="mess" id="reMess">${sessionScope.reMess}</span>
        </div>
        <div style="width: 380px;margin-left: 70px;margin-top: 40px;">
            <el-input v-model="cuname" placeholder="顾客姓名" style="width: 150px;"></el-input>
            <br>
            <el-input v-model="photo" placeholder="顾客电话" style="width: 150px;"></el-input>
            <br>
            <el-input v-model="reason" placeholder="理由" style="width: 150px;"></el-input>
            <br>
            <el-input v-model="pname" placeholder="商品名字" style="width: 150px;"></el-input>
            <br>
            <el-input v-model="count" placeholder="商品数量" style="width: 150px;"></el-input>
            <br>
            <el-input v-model="gid" placeholder="类别编号" style="width: 150px;"></el-input>
            <br>
            <el-button type="primary" plain @click="tj()">添加</el-button>
            <el-button type="primary" plain @click="zz()">重置</el-button>

        </div>

    </div>
</div>
</body>
<script>
    new Vue({
        el: '#app',
        data: {
            cuname: "",
            photo: "",
            reason: "",
            pname: "",
            gid: "",
            count: ""
        },
        methods: {
            tj() {
                var log = {
                    cuname: this.cuname,
                    photo: this.photo,
                    reason: this.reason,
                    pname: this.pname,
                    gid: this.gid,
                    count: this.count
                }
                window.location.href = "${webroot}/PSales/return.do?c=" + JSON.stringify(log)
            },
            zz() {
                this.cuname = ""
                this.photo = ""
                this.reason = ""
                this.pname = ""
                this.gid = ""
                this.count = ""
            }
        }
    })
</script>
</html>
